﻿<!--添加强类型声明-->
@model IEnumerable<MVCDemo.Models.SysUser>
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
</head>
<body>
    <div> 
        Account Index
        <p>@Html.ActionLink("Create New","Create")</p>

        <table>
            <tr>
                <th>@Html.DisplayNameFor(x=>x.UserName)</th>
                <th>@Html.DisplayNameFor(x=>x.Email)</th>
                <th></th>
            </tr>
            @foreach(var item in Model)
            {
            <tr>
                <td>@Html.DisplayFor(modelItem=>item.UserName)</td>
                <td>@Html.DisplayFor(modelItem=>item.Email)</td>
                <td>
                @Html.ActionLink("Details","Details",new { id=item.ID })
                @Html.ActionLink("Edit", "Edit", new { id=item.ID})
                    @Html.ActionLink("Delete","Delete",new { id=item.ID})
                </td>
            </tr>
            }
        </table>
    </div>
</body>
</html>
